<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java"  pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>检索结果页面</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="${pageContext.request.contextPath}/static/css/css.css" rel="stylesheet" type="text/css">

    <style type="text/css">
        #content {
            position: relative;
            top: 3px;
            width: 80%;
            height: 380px;
            margin: auto;
            overflow: hidden;
            z-index: 2;
        }

        .tab1 {
            position: relative;
            top: 40px;
            font-size: 24px;
        }

        #in1 {
            width: 250px;
            height: 30px;
            font-size: 24px;
        }

        #in3 {
            width: 250px;
            height: 30px;
            font-size: 24px;
        }

        #in2 {
            width: 80px;
            height: 28px;
        }

        button {
            position: relative;
            top: 60px;
        }
    </style>
</head>
<body>
<!-- include top -->
<jsp:include page="${pageContext.request.contextPath}/top.jsp" flush="true"/>
<center>
    <div id="content">
        <table border="1" cellpadding="0" cellspacing="0" class="tab1" width="700px">
            <tr>
                <th>宠物名称</th>
                <th>主人名称</th>
            </tr>

            <c:forEach items="${petsList}" var="pest">
                <tr align="center">
                    <td>
                        <a style="color: skyblue"
                           onmouseover="this.style.color='red'"<%--鼠标划入事件--%>
                           onmouseout="this.style.color='skyblue'"<%--鼠标划出事件--%>
                           href="${pageContext.request.contextPath}/pet/toUpdatePet?name=${pest.name}">${pest.name}</a>
                    </td>
                    <td>
                        <a style="color: skyblue"
                           onmouseover="this.style.color='red'"<%--鼠标划入事件--%>
                           onmouseout="this.style.color='skyblue'"<%--鼠标划出事件--%>
                           href="${pageContext.request.contextPath}/own/toOwnUpdate?name=${pest.owners.name}">${pest.owners.name}</a>
                    </td>
                        <%--<td style="font-size: 15px;"><a href="petupdate.jsp">修改</a></td>
                        <td style="font-size: 15px;color: green;"><a href="#">删除</a></td>--%>
                </tr>
            </c:forEach>
        </table>

        <button>
            <a href="${pageContext.request.contextPath}/pet/toPetSearch">重新查询</a>
        </button>

        <div style="margin-top:100px; margin-left: 20px; ">
            <c:if test="${msg!=null}">
                <span style="color: red">${msg}</span>
            </c:if>
        </div>

    </div>
</center>
<!-- include footer -->
<jsp:include page="${pageContext.request.contextPath}/footer.jsp" flush="true"/>
</body>
</html>
